<template>
  <view>
    <view class="cashList">
      <view class="img">
        <u-image radius="5" height="180rpx" width="220rpx" :src="cashInfo.avatar.path"></u-image>
      </view>
      <view class="txtDraw">
        <view class="free-box">
          <view class="cashTitle">
            {{cashInfo.title}}
          </view>
        </view>
        <view class="free-box" style="height: 72rpx;">
          <view class="cashDraw">
            {{cashInfo.intro}}
          </view>
        </view>
        <view class="cashUper">
          <view class="cashUper-box" style="max-width: 266rpx;min-width: 190rpx;justify-content: left;">
            <view class="uperImg">
              <u-image height="40rpx" width="40rpx" radius="6" :src="cashInfo.au_avatar.path"></u-image>
            </view>
            <text>{{cashInfo.author}}</text>
          </view>
          <view class="cashUper-box">
            <u-icon name="eye"></u-icon>
            <text style="margin-left: 6rpx;">{{cashInfo.view_count}}</text>
          </view>
          <view class="cashUper-box">
            <u-icon name="star"></u-icon>
            <text style="margin-left: 6rpx;">{{cashInfo.collect_count}}</text>
          </view>
        </view>
      </view>
    </view>
  </view>
</template>

<script>
  export default {
    name: "cashList",
    props: ['cashInfo'],
    data() {
      return {

      };
    },
    created() {
      // console.log("使用了cashList组件");
    }
  }
</script>

<style lang="scss">
  .cashList {
    display: flex;
    align-items: center;
    background-color: white;
    border-radius: 16rpx;
    height: 220rpx;
    width: 710rpx;

    .img {
      margin: 20rpx;
    }

    .txtDraw {
      padding: 20rpx 0;
      max-width: 440rpx;
      height: 100%;
      box-sizing: border-box;

      .free-box {
        display: flex;
        // align-items: center;
        height: 82rpx;
        overflow: hidden;
        box-sizing: border-box;
        width: 100%;
        text-overflow: ellipsis;
        // display:-webkit-box; 
        // -webkit-box-orient:vertical;
        // -webkit-line-clamp:2; 

        .cashTitle {
          color: black;
          font-weight: bold;
          font-size: 32rpx;
          max-height: 100%;
          overflow: auto;
          display: -webkit-box;
          -webkit-line-clamp: 2;
        }

        .cashDraw {
          color: #707070;
          font-size: 26rpx;
          overflow: auto;
          max-height: 100%;
          text-overflow: ellipsis;
        }
      }

      .cashUper {
        display: flex;
        align-items: center;
        height: 40rpx;
        font-size: 26rpx;

        .cashUper-box {
          display: flex;
          align-items: center;
          color: #595959;
          min-width: 90rpx;
          justify-content: center;

          .uperImg {
            margin-right: 16rpx;
          }
        }
      }
    }
  }
</style>